<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
	<div>
		<p>日照香炉生紫烟</p>
		<p>遥看不瀑挂前川</p>
		<p>飞流直下三千尺</p>
	</div>
		<script type="text/javascript">
			let div = document.getElementsByTagName("div")[0]

			let p = document.createElement('p')
			p.innerText = "来到了酒吧"
			//replaceChild("要替换新内容"，"要换掉就内容")  调用者父元素
			div.replaceChild(p, div.children[1])
		</script>
</body>
</html>